import request from '@/utils/request'

// 查询销售促销套餐列表
export function listGoodsPackageAll() {
  return request({
    url: '/webshop/GoodsPackage/listAll',
    method: 'get',
  })
}
// 查询销售促销套餐列表
export function listGoodsPackage(query) {
  return request({
    url: '/webshop/GoodsPackage/list',
    method: 'get',
    params: query
  })
}

// 查询销售促销套餐详细
export function getGoodsPackage(packageId) {
  return request({
    url: '/webshop/GoodsPackage/' + packageId,
    method: 'get'
  })
}

// 新增销售促销套餐
export function addGoodsPackage(data) {
  return request({
    url: '/webshop/GoodsPackage',
    method: 'post',
    data: data
  })
}

// 修改销售促销套餐
export function updateGoodsPackage(data) {
  return request({
    url: '/webshop/GoodsPackage',
    method: 'put',
    data: data
  })
}

// 删除销售促销套餐
export function delGoodsPackage(packageId) {
  return request({
    url: '/webshop/GoodsPackage/' + packageId,
    method: 'delete'
  })
}
